import type { RouteRecordRaw } from 'vue-router'
import env from '@/utils/env'
import getRoutes from '@/router/autoload/view'
import autoloadModelRoutes from '@/router/autoload/module'

/**
 * @FILENAME:  index.ts
 *  @Description:  // 路由配置
 * @Author: ellwood
 * @CreateDate: 2024/10/30 - 14:21
 * @Version: V1.0.0
 */

// eslint-disable-next-line import/no-mutable-exports
let routes = [] as RouteRecordRaw[]

if (env.VITE_ROUTER_AUTOLOAD)
  routes = getRoutes()
else routes = autoloadModelRoutes()

export default routes
